/**
 * 结算确认状态（1：未确认，2：已确认）
 * @Title: 账户类型 
 * @author fl
 * @date 2018年5月1日
 */

package com.example.jrfwcwgl.enums;

public enum ClearingConfirmStateEnum {

	WQR("未确认", 1),
    YQR("已确认", 2);

    private String name;
    private int index;

    private ClearingConfirmStateEnum(String name, int index) {
        this.name = name;
        this.index = index;
    }

    // 普通方法
    public static String getName(int index) {
        for (ClearingConfirmStateEnum c : ClearingConfirmStateEnum.values()) {
            if (c.getIndex() == index) {
                return c.name;
            }
        }
        return null;
    }

    public static Integer getIndex(String name) {
        for (ClearingConfirmStateEnum c : ClearingConfirmStateEnum.values()) {
            if (c.getName().equals(name)) {
                return c.getIndex();
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }
}
